<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <h2>get(target, propkey, receiver)</h2>
</body>
<script>
    let exam = {
        name: "Tom",
        age: 24
    }
    // 用于target 对象上 propkey的读取操作
    let proxy = new Proxy(exam, {
        get(target, propkey, receiver) {
            console.log("Getting" + propkey);
            return target[propkey];
        }
    })
    proxy.name
    //Getting name
    // "Tom"
</script>
</html>